import React, { Component } from 'react';
import App from './App';
import HelloWorld from './HelloWorld';
import Props from './props';
import DataService from './DataService';
import ComposingComponents from "./ComposingComponents.js" ;
import StateExample from './StateExample.js';
import EventHandlerComponent from './EventHandlerComponent.js';
import ConditionalReadering  from './ConditionalRendering.js';
import UserLoginedStateComponent  from './UserLoginedStateComponent.js';
import ListComponents  from './ListComponents.js';
import FormComponent from './FormComponent.js';
import LiftingStateUp from './LiftingStateUp.js';

import Composition from './Composition.js';

import SearchListComponent from './SearchListComponent.js';


class AppContext extends Component {


  constructor(props){
    super(props);
    //console.log(DataService.getInstance().getUserService());
    this.user = DataService.getInstance().getUserService().getUserById(1001);
  }
  render() {
    return (
      <div>
        <div>
          <HelloWorld/>
        </div>
        <div>
          <Props parameter={this.user}/>
        </div>
        <div>
          <ComposingComponents/>
        </div>
        <div>
          <StateExample/>
        </div>
         <div>
          <EventHandlerComponent/>
        </div>
        <div>
          <ConditionalReadering/>
        </div>
        <div>
          <ListComponents/>
        </div>
        <div>
          <FormComponent/>
        </div>
        <div>
          <LiftingStateUp/>
        </div>
        <div>
          <Composition/>
        </div>
        <div>
          <SearchListComponent/>
        </div>
      </div>
    );
  }
}


export default AppContext;
